#include "Color.h"


Color::Color(){}

Color::Color(Color* color){
	Color(color->getRed(),color->getGreen(),color->getBlue());
}

Color::Color(const Color& c1):red(c1.red), blue(c1.blue),green(c1.green){
	this->color=new SDL_Color;
	this->color->r = c1.red;
	this->color->b = c1.blue;
	this->color->g = c1.green;
}

Color::Color(int red, int green, int blue):red(red), blue(blue),green(green){

	this->color=new SDL_Color;
	this->color->r = red;
	this->color->b = blue;
	this->color->g = green;
	//this->color->alpha=255;
}


int Color::getRed()const{
	return this->red;
}

int Color::getBlue()const{
	return this->blue;
}

int Color::getGreen() const{
	return this->green;
}

SDL_Color* Color::getSDLColor(){
	return this->color;
}

Color::~Color(){
	if(this->color!=NULL){
		delete color;
		color=NULL;
	}
}